import request from '@/utils/request'

export const order = (mode, obj) => {
  return request({
    url: '/checkout/order',
    params: {
      mode,
      delivery: 10,
      payType: 10,
      couponId: 0,
      isUsePoints: 0,
      remark: '',
      ...obj
    }
  })
}

export const submit = (mode, obj) => {
  return request({
    url: '/checkout/submit',
    params: {
      mode,
      delivery: 10,
      payType: 10,
      couponId: 0,
      isUsePoints: 0,
      remark: '',
      ...obj
    }
  })
}

export const myOrder = (dataType, page) => {
  return request({
    url: '/order/list',
    params: {
      dataType,
      page
    }
  })
}
